<?php
/**
 * Desc:
 * User: zdb
 * Date: 2024/7/29
 * Time: 16:09
 */
namespace app\api\model\library;

use think\Model;

class LibPoemModel extends Model
{
    protected  $name = 'lib_poem';
    public function index()
    {

        return '您好！这是一个[api]示例应用';
    }


    /**
     * Desc: 新增单条数据
     * @param $data
     * @return mixed
     * Datetime: 2024/7/29 16:58 by zdb
     */
    public function insertOne($data)
    {
        return $this->strict(false)->duplicate($data)->insert($data, true);
    }

    /**
     * Desc: 批量添加
     * Datetime: 2024/7/29 16:48 by zdb
     */
    public function addMany($data)
    {
        return $this->insertAll($data);
    }
}